package cn.jobstart.es.model;

import lombok.Data;
import lombok.experimental.Accessors;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.Score;
import org.dromara.easyes.annotation.rely.Analyzer;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.annotation.rely.IdType;

/**
 * @author sunke
 * @version 1.0
 * @Description 企业es
 * @date 2023-09-22 10:42
 */

@Data
@IndexName(value = "company", shardsNum = 3, replicasNum = 1)
public class CompanyEs extends AbstractEsModel{


    @IndexId(type = IdType.CUSTOMIZE)
    private String id;


    @Score
    private float score;


    /**
     * 企业名称
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String name;

    /**
     * 组织机构代码
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String tin;

    /**
     * 企业性质
     * 1:外资:foreign_capital,2:合资:joint_venture,3:国企:state_owned_enterprise,4:私营/民营公司:private_companies,5:上市公司:listed_company,6:外企代表处:foreign_enterprise_representing,7:政府机关:government_office,8:事业单位:public_institutions,9:非盈利机构:non_profit_organization,10:其他性质:other_nature
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer nature;

    /**
     * 企业规模
     * 9:10人以下,49:10～50人,199:50～200人,499:200～500人,999:500～1000人,1000:1000人以上
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer scale;

    /**
     * 公司简介
     */
    @IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    private String intro;

    /**
     * 官网
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String website;


    /**
     * 省
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String province;

    /**
     * 城市
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String city;

    /**
     * 区
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String area;

    /**
     * 所在行业
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String industry;


    /**
     * 公司电话
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String tel;

    /**
     * 公司地址
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String address;

    /**
     * 传真
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String fax;

    /**
     * 电子邮箱
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String email;

    /**
     * 渠道来源
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer channel;

    /**
     * 来源企业ID
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String sourceCompanyId;

    /**
     * 行业ID
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String industryId;

    /**
     * 公司详情
     */
    @IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    private String info;


}
